home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Developer Essentials / DTS Sample Code / System 7.0 Samples / DTS.Utilities / Folders.p next >
Encoding:
Text File  |  1991-01-30  |  3.8 KB  |  131 lines  |  [TEXT/MPS ]

  1. {
  2. Created: Friday, October 20, 1989 at 4:39 AM
  3.     Folders.p
  4.     Pascal Interface to the Macintosh Libraries
  5.  
  6.     Copyright Apple Computer, Inc.    1989-90
  7.     All rights reserved
  8. }
  9.  
  10.  
  11. {$IFC UNDEFINED UsingIncludes}
  12. {$SETC UsingIncludes := 0}
  13. {$ENDC}
  14.  
  15. {$IFC NOT UsingIncludes}
  16.     UNIT Folders;
  17.     INTERFACE
  18. {$ENDC}
  19.  
  20. {$IFC UNDEFINED UsingFolders}
  21. {$SETC UsingFolders := 1}
  22.  
  23. {$I+}
  24. {$SETC FoldersIncludes := UsingIncludes}
  25. {$SETC UsingIncludes := 1}
  26. {$IFC UNDEFINED UsingTypes}
  27. {$I $$Shell(PInterfaces)Types.p}
  28. {$ENDC}
  29. {$IFC UNDEFINED UsingFiles}
  30. {$I $$Shell(PInterfaces)Files.p}
  31. {$ENDC}
  32. {$SETC UsingIncludes := FoldersIncludes}
  33.  
  34. CONST
  35.     kOnSystemDisk                    =        $8000;
  36.  
  37.     kCreateFolder                    =        TRUE;
  38.     kDontCreateFolder                =        FALSE;
  39.  
  40.     kSystemFolderType                =        'macs';     { the system folder }
  41.     kDesktopFolderType                =        'desk';     { the desktop folder; objects in this folder show on the desktop }
  42.     kTrashFolderType                =        'trsh';     { the trash folder; objects in this folder show up in the trash }
  43.     kWhereToEmptyTrashFolderType    =        'empt';     { the “empty trash” folder; Finder starts emptying from here down }
  44.  
  45.     kPrintMonitorDocsFolderType        =        'prnt';     { Print Monitor documents }
  46.  
  47.     kStartupFolderType                =        'strt';     { Finder objects (applications, documents, DAs, aliases to …) to open at startup go here }
  48.     kAppleMenuFolderType            =        'amnu';     { Finder objects to put into the Apple menu go here }
  49.     kControlPanelFolderType            =        'ctrl';        { Control Panels go here (may contain INITs) }
  50.     kExtensionFolderType            =        'extn';     { Finder extensions go here }
  51.  
  52.     kPreferencesFolderType            =        'pref';     { preferences for applications go here }
  53.     kTemporaryFolderType            =        'temp';     { temporary files go here (deleted periodically, but don’t rely on it) }
  54.  
  55.  
  56. FUNCTION FindFolder(vRefNum: INTEGER; folderType: OSType; createFolder: BOOLEAN;
  57.     VAR foundVRefNum: INTEGER; VAR foundDirID: LONGINT): OSErr;
  58. INLINE $7000, $A823;
  59.  
  60. {$ENDC}    { UsingFolders }
  61.  
  62. {$IFC NOT UsingIncludes}
  63.     END.
  64. {$ENDC}
  65.  
  66. {
  67. Created: Friday, October 20, 1989 at 4:39 AM
  68.     Folders.p
  69.     Pascal Interface to the Macintosh Libraries
  70.  
  71.     Copyright Apple Computer, Inc.    1989-90
  72.     All rights reserved
  73. }
  74.  
  75.  
  76. {$IFC UNDEFINED UsingIncludes}
  77. {$SETC UsingIncludes := 0}
  78. {$ENDC}
  79.  
  80. {$IFC NOT UsingIncludes}
  81.     UNIT Folders;
  82.     INTERFACE
  83. {$ENDC}
  84.  
  85. {$IFC UNDEFINED UsingFolders}
  86. {$SETC UsingFolders := 1}
  87.  
  88. {$I+}
  89. {$SETC FoldersIncludes := UsingIncludes}
  90. {$SETC UsingIncludes := 1}
  91. {$IFC UNDEFINED UsingTypes}
  92. {$I $$Shell(PInterfaces)Types.p}
  93. {$ENDC}
  94. {$IFC UNDEFINED UsingFiles}
  95. {$I $$Shell(PInterfaces)Files.p}
  96. {$ENDC}
  97. {$SETC UsingIncludes := FoldersIncludes}
  98.  
  99. CONST
  100.     kOnSystemDisk                    =        $8000;
  101.  
  102.     kCreateFolder                    =        TRUE;
  103.     kDontCreateFolder                =        FALSE;
  104.  
  105.     kSystemFolderType                =        'macs';     { the system folder }
  106.     kDesktopFolderType                =        'desk';     { the desktop folder; objects in this folder show on the desktop }
  107.     kTrashFolderType                =        'trsh';     { the trash folder; objects in this folder show up in the trash }
  108.     kWhereToEmptyTrashFolderType    =        'empt';     { the “empty trash” folder; Finder starts emptying from here down }
  109.  
  110.     kPrintMonitorDocsFolderType        =        'prnt';     { Print Monitor documents }
  111.  
  112.     kStartupFolderType                =        'strt';     { Finder objects (applications, documents, DAs, aliases to …) to open at startup go here }
  113.     kAppleMenuFolderType            =        'amnu';     { Finder objects to put into the Apple menu go here }
  114.     kControlPanelFolderType            =        'ctrl';        { Control Panels go here (may contain INITs) }
  115.     kExtensionFolderType            =        'extn';     { Finder extensions go here }
  116.  
  117.     kPreferencesFolderType            =        'pref';     { preferences for applications go here }
  118.     kTemporaryFolderType            =        'temp';     { temporary files go here (deleted periodically, but don’t rely on it) }
  119.  
  120.  
  121. FUNCTION FindFolder(vRefNum: INTEGER; folderType: OSType; createFolder: BOOLEAN;
  122.     VAR foundVRefNum: INTEGER; VAR foundDirID: LONGINT): OSErr;
  123. INLINE $7000, $A823;
  124.  
  125. {$ENDC}    { UsingFolders }
  126.  
  127. {$IFC NOT UsingIncludes}
  128.     END.
  129. {$ENDC}
  130.  
  131.